package cn.wsalix.weixin.req.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "WX_REQ_EVENT_LOCATION")
@Inheritance(strategy = InheritanceType.JOINED)
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@EntityListeners({ AuditingEntityListener.class })
public final class LocationEvent extends BaseEvent {

	/**
	 * 
	 */
	private static final long serialVersionUID = -320384477430759979L;
	private double latitude;
	@Basic
	@Column(columnDefinition = "DOUBLE")
	private double longitude;
	@Basic
	@Column(columnDefinition = "DOUBLE")
	private double precisions;

	public LocationEvent(double latitude, double longitude, double precisions) {
		super();
		this.latitude = latitude;
		this.longitude = longitude;
		this.precisions = precisions;
	}

	public double getLatitude() {
		return latitude;
	}

	public double getLongitude() {
		return longitude;
	}

	public double getPrecisions() {
		return precisions;
	}

	public void setPrecisions(double precisions) {
		this.precisions = precisions;
	}

	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}

	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}


}
